﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace JT.Domain.TimeLine
{
    public class Year
    {
        public Year()
        {
            TimeLines = new HashSet<TimeLine>();
        }
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Display(Name = "年份"), Required(ErrorMessage = "不能为空！")]
        [RegularExpression(@"^20[0-9]{2}$", ErrorMessage = "您输入的不是一个正确的年份！")]
        public int YearId { get; set; }



        public ICollection<TimeLine> TimeLines { get; set; }
    }
}
